package cn.com.vastbase.hibernate.sample.springmvc.business.service.impl;

import cn.com.vastbase.hibernate.sample.springmvc.business.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.support.TransactionSynchronizationManager;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private SomeThingCommon  someThingCommon;

    @Override
    public String doSomeThings(String id) throws NoSuchMethodException {
        String currentTransactionName = TransactionSynchronizationManager.getCurrentTransactionName();
        System.out.println("UserServiceImpl:"+currentTransactionName);
        return someThingCommon.doSomeThings(id);
    }

}
